body {
    width: 540px;
    height: 2000px;
    min-width: 320px;
    max-width: 1080px;
    margin: 0 auto;
    font: normal 14px/1.5 Tahoma, "Lucida Grande", Verdana, "Microsoft Yahei", STXihei, hei;
    color: #000;
    background: #f2f2f2;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: #222;
}


/* 搜索模块 */

.search-index {
    display: flex;
    /* 固定定位对margin的修改没有作用 */
    /* 固定定位是以屏幕为准的，跟父级没有关系 */
    position: fixed;
    top: 0;
    left: 50%;
    /* 如果加上left:50%这个值，则应该加上transform:transformX(-50%)的效果才能居中 */
    transform: translateX(-50%);
    /* 固定的盒子应有宽度 */
    width: 100%;
    min-width: 320px;
    max-width: 540px;
    height: 44px;
    background-color: white;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.search {
    position: relative;
    height: 26px;
    line-height: 24px;
    border: 1px solid #eee;
    flex: 1;
    font-size: 12px;
    color: #666;
    margin: 7px 10px;
    padding-left: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.search::before {
    content: "";
    position: absolute;
    background: url(../images/sprite.png) no-repeat -59px -279px;
    width: 15px;
    height: 15px;
    background-size: 104px auto;
    /* margin: 5px; */
    top: 5px;
    left: 5px;
}

.user {
    width: 44px;
    height: 44px;
    /* background-color: purple; */
    font-size: 12px;
    text-align: center;
    color: #2eaae0;
}


/* 用伪类给其添加精灵图 */

.user::before {
    content: "";
    display: block;
    width: 23px;
    height: 23px;
    /* 精灵图缩放三个步骤： 
        1.在切图工具中将精灵图缩放为原来的一半大小。 
        2.量一下缩放后的大小，写代码width和height，得到坐标59px和194px。  
        3.将精灵图缩放为原大小的一半，background-size: 104px auto */
    background: url(../images/sprite.png) no-repeat -59px -194px;
    background-size: 104px auto;
    margin: 5px auto -2px;
}


/* 焦点图 */

.focus {
    padding-top: 44px;
}

.focus img {
    width: 100%;
}


/* 局部导航栏 */

.local-nav {
    height: 64px;
    background-color: white;
    border-radius: 8px;
    margin: 3px 4px;
    display: flex;
}

.local-nav li {
    flex: 1;
}

.local-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* 属性选择器 */

.local-nav li [class^="local-nav-icon"] {
    width: 32px;
    height: 32px;
    background: url(../images/localnav_bg.png) no-repeat;
    background-size: 32px auto;
    margin-top: 8px;
}

.local-nav li .local-nav-icon-icon2 {
    background-position: 0 -32px;
}

.local-nav li .local-nav-icon-icon3 {
    background-position: 0 -64px;
}

.local-nav li .local-nav-icon-icon4 {
    background-position: 0 -96px;
}

.local-nav li .local-nav-icon-icon5 {
    background-position: 0 -128px;
}


/* nav中间布局 */

nav {
    overflow: hidden;
    border-radius: 10px;
    margin: 0 4px 3px;
}

.nav-common {
    display: flex;
    height: 88px;
    background-color: pink;
}

.nav-common:nth-child(2) {
    margin: 3px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}


/* -n+2，表示盒子前2个 */


/* 因为用的是css3的盒子模型，所以盒子不会和以前一样换行 */

.nav-item:nth-child(-n+2) {
    border-right: 1px solid #fff;
}

.nav-item-item {
    flex: 1;
    text-align: center;
    line-height: 44px;
    color: #fff;
    font-size: 14px;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.2);
}

.nav-item a:nth-child(2) {
    border-top: 1px solid #fff;
}


/* nav中间图片内容 */

.nav-item .itema1 {
    background: url(../images/sprite.png) no-repeat 55px -240px;
    background-size: 210px auto;
}

.nav-item .itema2 {
    background: url(../images/sprite.png) no-repeat 55px -568px;
    background-size: 210px auto;
}

.nav-item .itema3 {
    background: url(../images/sprite.png) no-repeat 55px -360px;
    background-size: 210px auto;
}


/* 加入线性渐变色背景 */

.nav-common:nth-child(1) {
    background: -webkit-linear-gradient(left, #fa5a55, #fa994d);
}

.nav-common:nth-child(2) {
    background: -webkit-linear-gradient(left, #4b90ed, #53bced);
}

.nav-common:nth-child(3) {
    background: -webkit-linear-gradient(left, #34c2a9, #6cd559);
}


/* .subnav-entry */

.subnav-entry {
    display: flex;
    flex-wrap: wrap;
    border-radius: 8px;
    background-color: #fff;
    margin: 0 4px;
    /* padding 为内部内容距边线的距离 */
    padding: 5px 0;
    box-shadow: 0 1px rgba(0, 0, 0, 0.2);
}

.subnav-entry li {
    flex: 20%;
}

.subnav-entry a {
    display: flex;
    flex-direction: column;
    align-items: center;
}

[class^="subnav-entry-icon"] {
    width: 28px;
    height: 28px;
    background: url(../images/subnav-bg.png) no-repeat;
    background-size: 28px auto;
    margin-top: 4px;
}

.subnav-entry-icon-icon2 {
    background-position: 0 -28px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon3 {
    background-position: 0 -62px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon4 {
    background-position: 0 -95px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon5 {
    background-position: 0 -130px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon6 {
    background-position: 0 -162px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon7 {
    background-position: 0 -197px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon8 {
    background-position: 0 -225px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon9 {
    background-position: 0 -255px;
    background-size: 28px auto;
}

.subnav-entry-icon-icon10 {
    background-position: 0 -285px;
    background-size: 28px auto;
}


/* sales-box */

.sales-box {
    border-top: 1px solid #eee;
    margin: 4px;
    background-color: #fff;
}

.sales-hd {
    position: relative;
    height: 44px;
    border-bottom: 1px solid #eee;
}

.sales-hd h2 {
    position: relative;
    /* 隐藏文字的方法：text-indent: -999px; */
    text-indent: -999px;
    overflow: hidden;
}


/* 加上绝对定位则变成块级元素 */

.sales-hd h2::after {
    position: absolute;
    content: "";
    top: 10px;
    left: 20px;
    width: 79px;
    height: 15px;
    background: url(../images/hot.png) no-repeat 0 -20px;
    background-size: 79px auto;
}


/* 更多活动 */

.more {
    position: absolute;
    right: 5px;
    top: 0px;
    background: -webkit-linear-gradient(left, #ff506c, #ff6bc6);
    border-radius: 8px;
    padding: 3px 20px 3px 10px;
    color: #fff;
}

.more::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
}


/* sales-bd */

.sales-bd .row {
    display: flex;
}

.sales-bd .row a {
    flex: 1;
    border-bottom: 1px solid #eee;
}

.sales-bd .row a:nth-child(odd) {
    flex: 1;
    border-right: 1px solid #eee;
}

.sales-bd .row a img {
    width: 100%;
}


/* footer部分 */

.tool-group {
    height: 64px;
    border-radius: 8px;
    display: flex;
    background-color: #fff;
}


/* .tool-group {
    display: flex;
    position: relative;
    height: 70px;
    /* background-color: pink; */

.tool-group a {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    border: 1px solid #eee;
}

.toolbox .tool-group [class^="tool-group"] {
    width: 32px;
    height: 32px;
    background: url(../images/sprite.png) no-repeat -65px -178px;
    background-size: 126px auto;
    margin-top: 2px;
}

.toolbox .tool-group .tool-group-icon2 {
    background: url(../images/sprite.png) -79px -240px;
    background-size: 146px auto;
}

.toolbox .tool-group .tool-group-icon3 {
    background: url(../images/sprite.png) no-repeat -68px -370px;
    background-size: 126px auto;
}